package com.wanxi.controller.other;

import com.wanxi.dto.ResultDTO;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @author Chengbo Zhang
 */
@RestController
@CrossOrigin("http://localhost:8081")
public class ErrorController {
    @RequestMapping("/noLogin")
    public ResultDTO noLogin(){
        return ResultDTO.builder().code(1).msg("noLogin").data("").count(0).build();

    }

    @RequestMapping("/errorLogin")
    public ResultDTO errorLogin(){
        return ResultDTO.builder().code(1).count(0).msg("账号或密码错误！").build();
    }

    @RequestMapping("/noAuthorize")
    public ResultDTO noAuthorize(){
        return ResultDTO.builder().code(1).count(0).msg("noAuthorize").build();
    }
}
